/*--------------------------------------------------------------
 * File: demo28.c 编码类型：C语言  UTF-8
 * Author WRS (1352509846@qq.com)
 * 功能: 判断数字为几位数
 * Version 0.1
 * Date 2022-01-23 
 * 
 * @copyright Copyright (c) 2022
 * 
----------------------------------------------------------------*/
#include <stdio.h>

int main(int argc, char const *argv[])
{
    int n;
    int cont = 0;
    printf("请输入一个整数：");
    scanf("%d",&n);

    while(n != 0)
    {
        n /= 10;
        cont++;
    }
    printf("是 %d 位数\n",cont);
    return 0;
}
